﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;
using Calendar.Logic.ObjectModel.Authorization;

namespace Calendar.Logic.ObjectModel
{
    [DataContract, MapField("EVU_EVENT", "FRS_ID"), MapField("EVU_USER", "SCN_ID"), TableName("EVENTUSERS")]
    public abstract class EventUser : JoinEntitys<Event, User> 
    {
        [MapField("EVU_AUTHOR"), DisplayName("Автор"), Required]
        public abstract bool Author { get; set; }

        [MapField("EVU_COLOR"), DisplayName("Цвет"), Required]
        public abstract EventColors Color { get; set; }
    }

    public enum EventColors
    {
        Blue = 1,
        Green,
        Red,
        Purple,
        Yellow
    }
}
